package mapper;

import DO.ChaptersDO;
import VO.ChapterVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChapterMapper {
    /**
     * 获取章节信息
     * @return
     */
    @Select("select id,chapter_number,description from chapters")
    List<ChapterVO> getChapter();

    /**
     * 获取全部信息
     * @param id
     * @return
     */
    @Select("select * from chapters where id = #{id}")
    public ChaptersDO getAll(Integer id);
}
